package com.pig.graduate.domain.material;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.pig.graduate.domain.BaseEntity;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 物料入库
 * @TableName material_storage
 */
@TableName(value ="material_storage")
@Data
public class MaterialStorage extends BaseEntity implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 状态
     */
    private Integer state;
    /**
     * 入库日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(shape = JsonFormat.Shape.STRING ,pattern ="yyyy-MM-dd")
    private Date storageDate;

    /**
     * 入库类型
     */
    private String storageType;

    /**
     * 入库数量
     */
    private Integer storageNumber;

    /**
     * 总价
     */
    private BigDecimal totalPrice;

    /**
     * 物料ID
     */
    private Long materialId;

    /**
     * 生产日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(shape = JsonFormat.Shape.STRING ,pattern ="yyyy-MM-dd")
    private Date dateOfManufacture;


    /**
     * 操作人员
     */
    private Long operatorsUser;

    /**
     * 物料批次
     */
    private String batchNumber;

    /**
     * 批次单价
     */
    private BigDecimal batchPrice;

    /**
     * 未出库数量
     */
    private Integer sdNumber;

    /**
     * 过期天数
     */
    private Integer overdueNumber;

    /**
     * 供应商
     */
    private Long supplierId;

    @TableField(exist = false)
    private String supplierName;

    //物料名称
    @TableField(exist = false)
    private String materialName;

    //物料类型
    @TableField(exist = false)
    private String materialType;

    //计量单位
    @TableField(exist = false)
    private String unitOfMeasure;

    //规格
    @TableField(exist = false)
    private String specification;

    //保质期
    @TableField(exist = false)
    private String ShelfLife;

    //提醒时间
    @TableField(exist = false)
    private String expiryReminders;

    //操作人
    @TableField(exist = false)
    private String nickName;

    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(shape = JsonFormat.Shape.STRING ,pattern ="yyyy-MM-dd")
    private Date storageTimeStart;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(shape = JsonFormat.Shape.STRING ,pattern ="yyyy-MM-dd")
    @TableField(exist = false)
    private Date storageTimeEnd;
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}